<template id="getregisterBook">
  <div id="d1">
     <el-table :data="registerBookList" style="width: 100%"  @row-click="detail" >

        <el-table-column prop="registerbookno" label="登记簿编号" width="120"></el-table-column>
        <el-table-column prop="location" label="房屋坐落" width="200"></el-table-column>
        <el-table-column prop="obligeeAndShare" label="所有权人（份额）"  width="200"></el-table-column>
        <el-table-column prop="qiuhao" label="丘号"  width="200"></el-table-column>
        <el-table-column prop="registertime" label="登记时间" width="150"></el-table-column>
        <el-table-column prop="uname" label="终审人/登簿人" width="150"> </el-table-column>

      
      </el-table> 
  </div>
</template>

<script>
export default {
  name: 'registerBookList',
  props:['params'],
  data () {
    return {
      registerBookList : [{}],
            registerbookno:null,
            location : null,
            obligeeAndShare : null,
            registertime :  null,
            qiuhao : null,
            uname : null,

         }
   

    },
  
  mounted(){
 
     this.show();
  },
  methods:{
    
    show(){
     
      let the=this;
      
      // console.log("xxxxx"+this.registerbookno);
      // alert(the.params.registerbookno);
      this.sa.ajax("http://localhost:8081/getRegisterBook",{registerBookNo:the.params.registerbookno},
        function (resp) {
      
          //  console.log("hhhh:"+resp.data.qiuhao);
            
            console.log("aaaa:"+resp.data[0].location);
          
            console.log("bbbb:"+resp.data[0]);
           let i=this.sa.forDate(this.registertime,2);//eslint-disable-line no-unused-vars
           
           the.registerBookList = resp.data;          
          //  console.log("ssss:"+the.registerBookList);

        }.bind(this),
        {type : 'get'}
      )
    },

      detail(row){
      //  console.log(row);
        //  let the=this;
        console.log("11:"+row.registerbookno);
        // alert(row.registerbookno);
    
         this.sa.ajax("http://localhost:8081/getRegisterBook",{registerBookNo:row.registerbookno},
          function (resp) {
            
            console.log("aaaa:"+resp.data[0].registerbookno);
          
            let i=this.sa.forDate(this.registertime,2);//eslint-disable-line no-unused-vars
            this.registerBookList = resp.data;
            // alert("test");
             
             console.log("222:"+resp.data);
             var tab = {id: 'registerdetail', name: '登记簿详细信息', view: () => import('@/sa-view/hpt/registerdetail.vue'), params: {registerBookList: this.registerBookList } };
             this.sa_admin.showTab(tab);
            }.bind(this), {type : 'get'}
         )
       let registerbookno=row.registerbookno;// eslint-disable-line no-unused-vars
       
    }
   

  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>